<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--商户管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrapSwitch.css">
    <link href="__STATIC_URL__/static/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css"/>
    <link rel="stylesheet" href="__STATIC_URL__/static/css/setcard.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/bootstrap-datetimepicker.css"/>
    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"
            charset="utf-8"></script>
    <script src="__STATIC_URL__/static/js/bootstrap-datetimepicker.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/js/setcard.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/layer/layer.js"></script>
</head>
<body id="body">
<style>
    .copy {

        margin-left: 210px;
    }
    .card{
        height: 167px;
        padding: 10px 9px;
    }
    .cardL-logo{
        width:27px;
        height:27px;
    }
    .cardL-body{
        background:#F6F6F8;
    }

    .cardL-name{
        margin-left: 6px;
    }
    .r-cell ul li{
        padding: 12px 14px 12px 14px;

    }
    .cardL-centers{
        margin: 0 5px;
        border-radius: 10px;
        display: block;
        overflow: hidden;

    }
    #pay-weixin{
        overflow: hidden;
    }
    .quick_pay{
        border-bottom: 0px solid #e7e7eb;
        padding: 17px 0 18px;
    }
    .left-tabs:hover {
        background-color: #fff;
        cursor: pointer;
    }
    .left-tabs.active {
        background-color: #fff;
    }
    span.r-title{
        color:#878787;
    }
    span.r-describe {
        font-size: 14px;
    }
    .member-card-editable-container {
        position: initial;
    }
</style>
{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <!--路径导航-->
        <ol class="breadcrumb">
            <li>当前位置是&nbsp;:</li>
            <li>
                <a href="{:url('alicards/cardinfoali',['template_id'=>$card['template_id']])}">支付宝会员卡</a>
            </li>
            <li class="active">会员卡修改</li>
        </ol>
        <!--修改会员卡主要内容-->
        <div class="card-content clearfix">
            <div class="pull-left card-left">
                <div class="cardL-body">

                    <div class="cardL-title"
                         style="background: #000 url(/assets/merchant/image/APPtop.png) no-repeat center top;"></div>
                    <div style=" padding: 8px 5px 0px 5px;">
                        {notempty name="card['bg_url_abs']"}
                        <div class="card" style="background-image: url({$card.bg_url_abs});background-position: left top;background-repeat: repeat;background-size: cover;">
                            {else/}
                            <div class="card" style="background-image: url(__STATIC_URL__/static/mobile/images/card_b.png);background-color: {$card['bg_color']};background-position: left top;background-repeat: repeat;background-size: cover;">
                            {/notempty}
                            <div class="cardL-top">
                                <div class="cardL-logo-wrap pull-left">
                                    <div style="background-size: cover;background-image:url({$card['logo_url_abs']});background-position:left top;"
                                         class="cardL-logo logopic"></div>
                                </div>
                                <div class="pull-left">
                                    <!--<div class="cardL-name brand_name">会员卡名称</div>-->
                                    <div class="cardL-name brand_title">{$card['card_show_name']}</div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <!--<img src="__STATIC_URL__/static/images/codes.png"style="width:45px;height:45px;position: absolute;top: 227px;left: 128px;"/>-->
                </div>
                <div class="cardL-centers">
                    <div class="quick_pay show ng-scope member-card-editable-container  left-tabs" id="pay-weixin">
                        <a href="javascript:;" class="ng-binding centerbt"
                           style="color: rgb(53, 164, 222); border-color: rgb(53, 164, 222);">
                            <img src="__STATIC_URL__/static/images/codes.png"style="width:45px;height:45px;position:absolute;top: 227px;left: 137px;text-align: center;"/>
                        </a>
                        <div style="font-size: 12px;margin-top: 4px;color:#3c3c3c;"
                             class="centerfbt ng-binding ng-scope hide center-title">支持储值卡和普通微信支付
                        </div>
                    </div>
                    <div class="cardL-type"style="padding-top:13px;">
                        <div class="card_custom_field left-jifen"id="jifen">
                            <span class="r-title">积分</span>
                            <span class="r-describe" style="color:rgb(53, 164, 222);">0</span>
                        </div>
                        <div class="card_custom_field left-yue"id="yue">
                            <span class="r-title">余额</span>
                            <span class="r-describe" style="color: rgb(53, 164, 222);">0元</span>
                        </div>
                        <div class="card_custom_field left-tabs self-type type" onclick="tabsigleshow('profile','type')"id="rank">

                            <span class="r-title typetext" id="left-type-bt">等级</span>
                            <span class="r-describe" style="color:rgb(53, 164, 222);">查看</span>
                        </div>
                    </div>

                    <div class="r-cell s-first" id="card-self-tab">
                        <ul>

                            <li class="member-card-editable-container left-tabs recharge"
                                onclick="tabsigleshow('settings','recharge')">
                                <span class="ng-binding self-0-bt">
                                    {if condition="$card['is_cell1'] neq '1'"}自定义入口
                                {else/}
                                {if condition="$card['column1']['title'] eq ''"}
                                自定义入口
                                {else/}
                                {$card['column1']['title']}
                                {/if}
                                {/if}
                                   </span>
                                <span class="r-tip  self-0-lfbt"style="display:none;">未使用</span>
                            </li>
                            <li class="member-card-editable-container left-tabs integral"
                                onclick="tabsigleshow('settings','integral')">
                                <span class="ng-binding self-1-bt">
                                   {if condition="$card['is_cell2'] neq '1'"}自定义入口1
                                {else/}
                                    {if condition="$card['column2']['title'] eq ''"}
                                    自定义入口1
                                    {else/}
                                        {$card['column2']['title']}
                                    {/if}
                                {/if}
                                </span>
                                <span class="r-tip  self-1-lfbt"style="display:none;">未使用</span>
                            </li>
                            <li class="member-card-editable-container left-tabs marketing"
                                onclick="tabsigleshow('settings','marketing')">
                                <span class="ng-binding self-2-bt">
                                     {if condition="$card['is_cell3'] neq '1'"} 营销入口
                                {else/}
                                    {if condition="$card['column3']['title'] eq ''"}
                                    自定义入口1
                                    {else/}
                                        {$card['column3']['title']}
                                    {/if}
                                {/if}


                                </span>
                                <span class="r-tip ng-binding self-2-lfbt"style="display:none;">未使用</span>
                            </li>
                            <li class="member-card-editable-container memberDetail carddetail left-tabs" onclick="tabsigleshow('carddetail','memberDetail')">
                                <span>会员卡详情</span>
                            </li>
                            <!--<li class="member-card-editable-container applyMall carddetail left-tabs" onclick="tabsigleshow('carddetail','applyMall')"><span>适用门店</span></li>-->
                            <li><span>公众号</span></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="cardR-right">
                <div style="width: 100%;">
                    <!-- TAB导航 -->
                    <ul class="nav nav-tabs" role="tablist" id="myTabs">
                        <li role="presentation" class="active">
                            <a href="#home" aria-controls="home" role="tab" data-toggle="tab">基本信息</a>
                        </li>
                        <li role="presentation">
                            <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">自定义会员信息类目</a>
                        </li>
                        <li role="presentation">
                            <a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">中心按钮</a>
                        </li>
                        <li role="presentation">
                            <a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">自定义/营销入口</a>
                        </li>
                        <li role="presentation">
                            <a href="#carddetail" aria-controls="carddetail" role="tab" data-toggle="tab">会员卡详情</a>
                        </li>
                    </ul>
                    <!-- Tab 内容 -->
                    <div class="panel panel-default" style="margin-top: 15px;">
                        <form class="form-horizontal" action="" method="post">
                            <div class="tab-content">
                                <!--基本信息-->
                                <div role="tabpanel" class="tab-pane active" id="home">
                                    <div class="panel-heading">基本信息</div>
                                    <div class="panel-body">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">卡券封面：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>
                                            <div class="col-sm-10">
                                                <select class="form-control" id="cover">
                                                    <option value="1">图片</option>
                                                    <option value="2">颜色</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <div class="col-sm-10">
                                                <div class="show cover">
                                                    <div class="r-desc ng-scope">请参照
                                                        <a style="color: #2db7f5;display: inline-block;font-size: 14px;" href="https://mp.weixin.qq.com/cgi-bin/readtemplate?t=cardticket/card_cover_tmpl&amp;type=info&amp;lang=zh_CN" title="" target="_blank">图片规范</a> 上传  建议1000*600像素 格式为.jpg
                                                    </div>
                                                    <div class="ng-scope" style="position: relative;">
                                                        <span class="btn btn-default">上传会员卡图片</span>
                                                        <input type="file" id="card" value="" onchange="upload('card', 'file')"/>
                                                        <input type="hidden" name="style[bg_url_abs]" id="card-upload" value="{$card['bg_url_abs']}">
                                                        <input type="hidden" name="style[bg_url_id]" id="card-url_id" value="{$card['bg_url_id']}">
                                                        <input type="hidden" name="style[bg_url_ali]" id="card-url_ali" value="{$card['bg_url_ali']}">
                                                    </div>
                                                </div>
                                                <div class="cover hide" id="colors">
                                                    <input type="hidden" name="base[color]" value="{$card['bg_color']}">
                                                    <ul class="color-list clearfix">
                                                        <li {if condition="$card['bg_color'] eq '#63b359'"} class="selected" {/if} style="background-color:#63b359;" data-color="#63b359"></li>
                                                        <li {if condition="$card['bg_color'] eq '#2c9f67'"} class="selected" {/if} style="background-color:#2c9f67;" data-color="#2c9f67"></li>
                                                        <li {if condition="$card['bg_color'] eq '#509fc9'"} class="selected" {/if} style="background-color:#509fc9;" data-color="#509fc9"></li>
                                                        <li {if condition="$card['bg_color'] eq '#5885cf'"} class="selected" {/if} style="background-color:#5885cf;" data-color="#5885cf"></li>
                                                        <li {if condition="$card['bg_color'] eq '#9062c0'"} class="selected" {/if} style="background-color:#9062c0;" data-color="#9062c0"></li>
                                                        <li {if condition="$card['bg_color'] eq '#d09a45'"} class="selected" {/if} style="background-color:#d09a45;" data-color="#d09a45"></li>
                                                        <li {if condition="$card['bg_color'] eq '#e4b138'"} class="selected" {/if} style="background-color:#e4b138;" data-color="#e4b138"></li>
                                                        <li {if condition="$card['bg_color'] eq '#ee903c'"} class="selected" {/if} style="background-color:#ee903c;" data-color="#ee903c"></li>
                                                        <li {if condition="$card['bg_color'] eq '#f08500'"} class="selected" {/if} style="background-color:#f08500;" data-color="#f08500"></li>
                                                        <li {if condition="$card['bg_color'] eq '#a9d92d'"} class="selected" {/if} style="background-color:#a9d92d;" data-color="#a9d92d"></li>
                                                        <li {if condition="$card['bg_color'] eq '#dd6549'"} class="selected" {/if} style="background-color:#dd6549;" data-color="#dd6549"></li>
                                                        <li {if condition="$card['bg_color'] eq '#cc463d'"} class="selected" {/if} style="background-color:#cc463d;" data-color="#cc463d"></li>
                                                        <li {if condition="$card['bg_color'] eq '#cf3e36'"} class="selected" {/if} style="background-color:#cf3e36;" data-color="#cf3e36"></li>
                                                        <li {if condition="$card['bg_color'] eq '#5E6671'"} class="selected" {/if} style="background-color:#5E6671" data-color="#5E6671"></li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label">商户名称：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<input type="hidden" name="" value="">-->
                                                <!--<input type="hidden" name="mid" value="{$card.mid}">-->
                                                <!--<input type="text" maxlength="12" name="base[brand_name]" readonly="readonly" id="brand_name" value="" class="form-control" oninput="binding('brand_name')" required="required"/>-->
                                                <!--<div class="r-desc ng-binding ng-scope">建议会员卡标题包含商户名或服务内容，如**会员尊享卡,字数上限为12个字符。</div>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">会员卡标题：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>
                                            <div class="col-sm-10">
                                                <input type="text" name="style[card_show_name]" maxlength="9" readonly class="form-control" value="{$card['card_show_name']}" id="brand_title" oninput="binding('brand_title')" required="required"/>
                                                <div class="r-desc ng-binding ng-scope">建议会员卡标题包含商户名或服务内容，如**会员尊享卡,字数上限为9个字符。</div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">LOGO：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>
                                            <div class="col-sm-10">
                                                <div class="ng-scope" style="position: relative;">
                                                    <span class="btn btn-default">上传</span>
                                                    <!--<input type="file" id="logopic" value="" onchange="upload('logopic', 'file')"/>-->
                                                    <!--<input type="hidden" id="logopic-pic"  value="{$card['logo_url_abs']}" name="logo_url_abs">-->

                                                    <input type="file" id="logopic" value=""  onchange="upload('logopic', 'file')"/>
                                                    <input type="hidden" name="style[logo_url_abs]" id="logopic-upload" value="{$card['logo_url_abs']}" >
                                                    <input type="hidden" name="style[logo_url_id]" id="logopic-url_id" value="{$card['logo_url_id']}" >
                                                    <input type="hidden" name="style[logo_url_ali]" id="logopic-url_ali" value="{$card['logo_url_ali']}" >
                                                </div>
                                                <img src="{$card['logo_url_abs']}" alt="" class="logopic-img" style="margin-top: 10px;width: 100px;height: 100px;border: none;display: block;"/>
                                                <div class="r-desc ng-binding ng-scope">建议300*300像素 格式为.jpg</div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ng-binding">code展示类型：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>
                                            <div class="col-sm-10">
                                                <select name="style[code_type]" class="selectpicker form-control ng-valid ng-scope ng-not-empty ng-dirty ng-valid-parse ng-touched">
                                                    <option label="二维码" value="qrcode" selected="selected">
                                                        二维码
                                                    </option>
                                                </select>
                                            </div>
                                        </div>

                                        <!---->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label">每人可领取：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<input type="text" name="" value="" class="form-control" required="required"/>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label">创建库存数量：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->

                                                <!--<input type="text" name="" readonly="readonly" value="" class="form-control" required="required"/>-->
                                                <!--<input type="hidden" name="activate" value="0">-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">激活方式：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
													<!--<span class="radio pull-left" style="margin-right: 15px;">-->
														<!--<input name="activate" disabled="disabled" {if condition="$card['activate'] eq '1'"}checked{/if} type="radio" style="margin-left: 0;">-->
														<!--<label class="ng-binding">自动</label>-->
													<!--</span>-->
                                                <!--<span class="radio pull-left">-->
														<!--<input name="activate" disabled="disabled"  {if condition="$card['activate'] eq '0'"}checked{/if} type="radio" style="margin-left: 0;">-->
														<!--<label class="ng-binding">填写信息后激活</label>-->
													<!--</span>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label">有效期：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<label class="control-label ng-scope">永久有效</label>-->
                                                <!--<input type="hidden" name="base[date_info][type]"-->
                                                       <!--value="DATE_TYPE_PERMANENT">-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">可用时段：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
													<!--<span class="radio">-->
														<!--<input name="time_limit" type="radio" checked="checked"-->
                                                               <!--style="margin-left: 0;">-->
														<!--<label class="ng-binding">全部时段</label>-->
													<!--</span>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">折扣优惠：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
													<!--<span class="radio pull-left" style="margin-right: 15px;">-->
														<!--<input name="is_discount" value="1" type="radio" {if condition="$card['discount'] neq '0'"}checked{/if} style="margin-left: 0;">-->
														<!--<label class="ng-binding">启用</label>-->
													<!--</span>-->
                                                <!--<span class="radio pull-left">-->
														<!--<input name="is_discount" value="0"  type="radio" {if condition="$card['discount'] eq '0'"}checked{/if} style="margin-left: 0;">-->
														<!--<label class="ng-binding">不启用</label>-->
													<!--</span>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group {if condition="$card['discount'] eq '0'"} hide {/if}" id="discount">-->
                                            <!--<label class="col-sm-2 control-label">折扣：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<input type="text" name="discount" value="{$card['discount']}" class="form-control"/>-->
                                                <!--<div class="r-desc ng-binding ng-scope">请填写1-99之间的数字，88即8.8折</div>-->
                                            <!--</div>-->
                                        <!--</div>-->

                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">积分优惠：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<span class="radio pull-left" style="margin-right: 15px;">-->
                                                    <!--<input name="supply_bonus" value="1" checked type="radio" style="margin-left: 0;">-->
                                                    <!--<label class="ng-binding">启用</label>-->
                                                <!--</span>-->

                                                <!--<span class="radio pull-left">-->
														<!--<input name="supply_bonus" value="2" type="radio"   condition="" checked  style="margin-left: 0;">-->
														<!--<label class="ng-binding">不启用</label>-->
													<!--</span>-->

                                            <!--</div>-->
                                        <!--</div>-->

                                        <!--<div id="is_bonus"  condition="" class="hide" >-->
                                            <!--<div class="form-group">-->
                                                <!--<label class="col-sm-2 control-label">初始积分：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                                <!--<div class="col-sm-10">-->
                                                    <!--<input type="text" name="bonus[init_increase_bonus]" value="{$card['bonus_rule']['init_increase_bonus']}" class="form-control"/>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                            <!--<div class="form-group"><label class="col-sm-2 control-label">消费送积分：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                                <!--<div class="col-sm-10">-->
                                                    <!--<div class="form-inline">-->
                                                        <!--每消费-->
                                                        <!--<input name="bonus[cost_money_unit]" value="{$card['bonus_rule']['cost_money_unit']}" class="form-control">-->
                                                        <!--元,赠送-->
                                                        <!--<input name="bonus[increase_bonus]" value="{$card['bonus_rule']['increase_bonus']}" class="form-control">-->
                                                        <!--积分-->
                                                    <!--</div>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                            <!--<div class="form-group">-->
                                                <!--<label class="col-sm-2 control-label">单次上限：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                                <!--<div class="col-sm-10">-->
                                                    <!--<input type="text" name="bonus[max_increase_bonus]"  value="{$card['bonus_rule']['max_increase_bonus']}" class="form-control"/>-->
                                                    <!--<div class="r-desc ng-binding ng-scope">请设置单次增加积分的上限，不填写表示无限制</div>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                            <!--<div class="form-group"><label class="col-sm-2 control-label">积分抵扣：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                                <!--<div class="col-sm-10">-->
                                                    <!--<div class="form-inline">-->
                                                        <!--每使用-->
                                                        <!--<input name="bonus[cost_bonus_unit]"  value="{$card['bonus_rule']['cost_bonus_unit']}" class="form-control">-->
                                                        <!--积分,抵扣-->
                                                        <!--<input name="bonus[reduce_money]"  value="{$card['bonus_rule']['reduce_money']}" class="form-control">-->
                                                        <!--元-->
                                                    <!--</div>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                            <!--<div class="form-group"><label class="col-sm-2 control-label">抵扣条件：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                                <!--<div class="col-sm-10">-->
                                                    <!--<div class="form-inline">-->
                                                        <!--订单满-->
                                                        <!--<input name="bonus[least_money_to_use_bonus]"  value="{$card['bonus_rule']['least_money_to_use_bonus']}" class="form-control">-->
                                                        <!--元可用，单笔上限-->
                                                        <!--<input name="bonus[max_reduce_bonus]"  value="{$card['bonus_rule']['max_reduce_bonus']}" class="form-control">-->
                                                        <!--积分-->
                                                    <!--</div>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                        <!--</div>-->

                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane" id="profile" style="margin: 15px;">
                                    <div class="panel-body">
                                        <div class="alert hide alert-danger ng-scope">该会员卡已开通储值卡，自定义会员信息类目一不再生效！</div>
                                        <div class="form-group hide">
                                            <label class="col-sm-2 control-label ng-binding">余额开关：</label>
                                            <div class="col-sm-10">
													<span class="radio pull-left" style="margin-right: 15px;">
														<input name="supply_balance" value="1" {if condition="$card.supply_balance eq '1'"}disabled="disabled" checked{/if} type="radio"  style="margin-left: 0;">
														<label class="ng-binding">启用</label>
													</span>
                                                <span class="radio pull-left">
														<input name="supply_balance" value="2"{if condition="$card.supply_balance eq '1'"}disabled="disabled"{/if}  {if condition="$card.supply_balance eq '2'"}checked{/if} type="radio" style="margin-left: 0;">
														<label class="ng-binding">不启用</label>
													</span>
                                            </div>
                                        </div>
                                        <div class="panel hide panel-default level-2" style="display: none;">
                                            <div class="panel-heading">自定义会员信息类目0
                                                <div class="pull-right">
                                                    <input type="hidden" value="1" name="is_field2" >
                                                </div>
                                            </div>
                                            <div class="panel-body" style="padding:30px;">
                                                <div class="form-group">
                                                    <label class="font400">标题(选填)：</label>
                                                    <input type="text" class="form-control" name="" value="余额" placeholder="请输入标题(选填)" readonly>
                                                </div>
                                                <div class="form-group">
                                                    <label class="font400">链接：</label>
                                                    <input type="text" name="" class="form-control" value="https://os.wunengkeji.com/mobile.php/carduser/balance" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel panel-default level-2" id="type">
                                            <div class="panel-heading">自定义会员信息类目1
                                                <div class="pull-right">
                                                    <input type="hidden" value="{$card.is_rank}" name="is_field3" class="top-type-2">
                                                    <a class="btn-link2 ng-scope" data-type="2" href="javascript:;">{if condition="$card.is_rank eq '1'"}已开启{else}已关闭{/if}</a>
                                                </div>
                                            </div>
                                            <div class="panel-body" style="padding:30px;">
                                                <div class="form-group">
                                                    <label class="font400">类型：</label>
                                                    <select name="custom_field3[name]" id="self-type-ch" class="form-control"  condition="" disabled onchange="selfselect(this.id)">
                                                        {volist name="urllists" id="vo1"}
                                                            <option   condition=" "selected  value="{$vo1.name}" data-bt="{$vo1.name}" data-fbt="{$vo1.sub_name}" data-url="{$vo1.url}">{$vo1.name}</option>
                                                        {/volist}
                                                    </select>
                                                </div>
                                                <div class="form-group">
                                                    <label class="font400">标题(选填)：</label>
                                                    <input type="text" readonly value="查看" class="form-control" placeholder="请输入标题(选填)" id="typetext">
                                                </div>
                                                <div class="form-group">
                                                    <label class="font400">链接：</label>
                                                    <input name="" readonly class="form-control"  id="type-url" value=""  placeholder="">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane" id="messages">
                                    <div class="panel-body">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ng-binding">按钮</label>
                                            <div class="col-sm-10">
													<span class="radio pull-left" style="margin-right: 15px;">
														<input name="base[is_center]" {if condition="$card['is_user_center'] neq '2'"}checked{/if}  value="1" type="radio"
                                                               style="margin-left: 0;">
														<label class="ng-binding">显示</label>
													</span>
                                                <span class="radio pull-left">
														<input name="base[is_center]" type="radio" value="2" {if condition="$card['is_user_center'] eq '2'"}checked{/if}
                                                               style="margin-left: 0;">
														<label class="ng-binding">不显示</label>
													</span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ng-binding">积分</label>
                                            <div class="col-sm-10">
													<span class="radio pull-left" style="margin-right: 15px;">
														<input name="base[is_jifen]" {if condition="$card['is_bonus'] neq '2'"}checked{/if} value="1" type="radio"
                                                               style="margin-left: 0;">
														<label class="ng-binding">显示</label>
													</span>
                                                <span class="radio pull-left">
														<input name="base[is_jifen]" type="radio" value="2"{if condition="$card['is_bonus'] eq '2'"}checked{/if}
                                                               style="margin-left: 0;">
														<label class="ng-binding">不显示</label>
													</span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ng-binding">余额</label>
                                            <div class="col-sm-10">
													<span class="radio pull-left" style="margin-right: 15px;">
														<input name="base[is_yue]" {if condition="$card['is_money'] neq '2'"}checked{/if} value="1" type="radio"
                                                               style="margin-left: 0;">
														<label class="ng-binding">显示</label>
													</span>
                                                <span class="radio pull-left">
														<input name="base[is_yue]" type="radio" value="2" {if condition="$card['is_money'] eq '2'"}checked{/if}
                                                               style="margin-left: 0;">
														<label class="ng-binding">不显示</label>
													</span>
                                            </div>
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">按钮类型：</label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<select name="base[center]" class="form-control" id="swithtype" onchange="selecttype(this.id)" disabled>-->
                                                    <!--<option value="9">微信支付</option>-->
                                                    <!--{volist name="urllist" id="vo"}-->
                                                    <!--<option value="{$vo.name}" data-url="{$vo.url}"  condition=""selected  >{$vo.name}</option>-->
                                                    <!--{/volist}-->
                                                <!--</select>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">标题：</label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<input type="text" class="form-control swithtype swithtype-bt" readonly="readonly" name="base[center_title]" id="centerbt" value="{$card['card_show_name']}" placeholder=""/>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                        <!--<label class="col-sm-2 control-label ng-binding">副标题：</label>-->
                                        <!--<div class="col-sm-10">-->
                                        <!--<input type="text" class="form-control swithtype swithtype-fbt" name="base[center_sub_title]" id="centerfbt" value="" placeholder=""/>-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label ng-binding">链接：</label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<input type="text" class="form-control swithtype swithtype-url" readonly="readonly" name="base[center_url]" id="center_url" value="" placeholder=""/>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane" id="settings">
                                    <div class="panel-body">
                                        <div class="panel panel-default" id="recharge">
                                            <div class="panel-heading">自定义入口
                                                <div class="pull-right">
                                                    <input type="hidden" name="is_cell1" id="self-ipt-0" value="{$card['is_cell1']}">
                                                    <a class="btn-link ng-scope" href="javascript:;" data-type="0" data-name="自定义入口">{if condition="$card['is_cell1'] eq '2'"}已关闭{else}已开启{/if}</a>
                                                </div>
                                            </div>
                                            <div class="panel-body" style="padding:30px;">
                                                <input type="hidden" name="column1[operate_type]" class="self-0-code" value="openWeb">
                                                <div class="form-group">
                                                    <label class="font400">标题：</label>
                                                    <select name="column1[title]" {if condition="$card['is_cell1'] neq '1'"}disabled{/if} class="form-control" id="self-0" onchange="selectchange(this.id)">
                                                        <option value="">--请选择--</option>
                                                        {volist name="urllist" id="dict"}
                                                        <option value="{$dict.name}" data-title="{$dict.sub_name}" data-url="{$dict.url}" {if condition="$card['column1']['title'] eq $dict.name"}selected{/if}>{$dict.name}</option>
                                                        {/volist}
                                                    </select>
                                                </div>
                                                <div class="form-group">
                                                    <!--<label class="font400">副标题：</label>-->
                                                    <input type="hidden" name="column1[code]" readonly="readonly" class="form-control self-0-fbt" value="{$card['column1']['code']}">
                                                </div>
                                                <div class="form-group">
                                                    <label class="font400">链接：</label>
                                                    <input type="text" name="column1[url]" readonly="readonly" class="form-control self-0-url" placeholder="" value="{$card['column1']['url']}">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel panel-default" id="integral">
                                            <div class="panel-heading">自定义入口1
                                                <div class="pull-right">
                                                    <input type="hidden" name="is_cell2" id="self-ipt-1" value="{$card['is_cell2']}">
                                                    <a class="btn-link ng-scope" href="javascript:;" data-type="1" data-name="自定义入口1">{if condition="$card['is_cell2'] eq '2'"}已关闭{else}已开启{/if}</a>
                                                </div>
                                            </div>
                                            <div class="panel-body" style="padding:30px;">
                                                <input type="hidden" name="column2[operate_type]" class="self-0-code" value="openWeb">
                                                <div class="form-group">
                                                    <label class="font400">标题：</label>
                                                    <select name="column2[name]"  {if condition="$card['is_cell2'] neq '1'"}disabled{/if} class="form-control" id="self-1" onchange="selectchange(this.id)">
                                                        <option value="">--请选择--</option>
                                                        {volist name="urllist" id="dict1"}
                                                        <option value="{$dict1.name}" data-title="{$dict1.sub_name}" data-url="{$dict1.url}"  {if condition="$card['column2']['title'] eq $dict1.name"}selected{/if}>{$dict1.name}</option>
                                                        {/volist}
                                                    </select>
                                                </div>
                                                <div class="form-group">
                                                    <!--<label class="font400">副标题：</label>-->
                                                    <input type="hidden" name="column2[code]" readonly="readonly" class="form-control self-0-fbt" value="{$card['column2']['code']}">
                                                </div>
                                                <div class="form-group">
                                                    <label class="font400">链接：</label>
                                                    <input type="text" name="column2[url]"  value="{$card['column2']['url']}"  class="form-control self-1-url" readonly="readonly" placeholder="">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel panel-default" id="marketing">
                                            <div class="panel-heading">自定义栏位3
                                                <div class="pull-right">
                                                    <input type="hidden" name="is_cell3" id="self-ipt-2" value="{$card['is_cell3']}">
                                                    <a class="btn-link ng-scope" href="javascript:;" data-type="2"
                                                       data-name="自定义入口1">{if condition="$card['is_cell3'] eq '2'"}已关闭{else}已开启{/if}</a>
                                                </div>
                                            </div>
                                            <div class="panel-body" style="padding:30px;">
                                                <input type="hidden" name="column3[operate_type]" class="self-0-code" value="openWeb">
                                                <div class="form-group">
                                                    <label class="font400">标题：</label>
                                                    <select name="column3[title]" {if condition="$card['is_cell3'] neq '1'"}disabled{/if} class="form-control" id="self-2" onchange="selectchange(this.id)">
                                                        <option value="">--请选择--</option>
                                                        {volist name="urllist" id="dict2"}
                                                        <option value="{$dict2.name}" data-title="{$dict2.value}" data-code="{$dict.value}" data-url="{$dict2.url}"{if condition="$card['column3']['title'] eq $dict2.name"}selected{/if}>{$dict2.name}</option>
                                                        {/volist}
                                                    </select>
                                                </div>
                                                <div class="form-group">
                                                    <!--<label class="font400">类型：</label>-->
                                                    <input type="hidden" name="column3[code]" readonly="readonly" class="form-control self-0-fbt" value="{$card['column3']['code']}">
                                                </div>
                                                <div class="form-group">
                                                    <label class="font400">链接：</label>
                                                    <input type="text" name="column3[url]" value="{$card['column3']['url']}" class="form-control self-1-url" readonly="readonly" placeholder="">
                                                </div>

                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane" id="carddetail">
                                    <div class="panel-body">
                                        <!--<div class="panel panel-default" id="applyMall">-->
                                            <!--<div class="panel-heading">适用门店</div>-->
                                            <!--<div class="form-group">-->
                                                <!--<label class="col-sm-2 control-label">适用门店：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>-->
                                                <!--<div class="col-sm-10">-->
                                                    <!--&lt;!&ndash;<div>&ndash;&gt;-->
                                                        <!--&lt;!&ndash;&lt;!&ndash;<span class="radio" style="margin-right: 15px;">&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;<input name="base[is_locations]" value="1" type="radio" {if condition="$card['is_locations'] eq '1'"} checked{/if} style="margin-left: 0;">&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;<label class="ng-binding">全部门店（只有选择全部门店，APP会员卡才会显示<span style="color: #00aff0;">适用门店</span>项）</label>&ndash;&gt;&ndash;&gt;-->
                                                        <!--&lt;!&ndash;&lt;!&ndash;</span>&ndash;&gt;&ndash;&gt;-->
                                                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
                                                    <!--&lt;!&ndash;<div>&ndash;&gt;-->
                                                        <!--&lt;!&ndash;<span class="radio" style="margin-right: 15px;">&ndash;&gt;-->
                                                            <!--&lt;!&ndash;<input name="base[is_locations]" value="2" {if condition="$card['is_locations'] eq '2'"} checked{/if}  type="radio" style="margin-left: 0;">&ndash;&gt;-->
                                                            <!--&lt;!&ndash;<label class="ng-binding">指定门店</label>&ndash;&gt;-->
                                                            <!--&lt;!&ndash;<div style="padding-left: 20px;"  {if condition="$card['is_locations'] neq '2'"} class="hide"{/if} id="zdmd">&ndash;&gt;-->
                                                                <!--&lt;!&ndash;<input type="hidden" name="base[location_id_list]" id="location_id_list">&ndash;&gt;-->
                                                                <!--&lt;!&ndash;<a href="javascript:;" data-toggle="modal" data-target="#myModal" style="color: #459AE9;font-size: 14px;">添加适用门店</a>&ndash;&gt;-->
                                                            <!--&lt;!&ndash;</div>&ndash;&gt;-->
                                                        <!--&lt;!&ndash;</span>&ndash;&gt;-->
                                                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
                                                    <!--&lt;!&ndash;<div>&ndash;&gt;-->
                                                        <!--&lt;!&ndash;&lt;!&ndash;<span class="radio" style="margin-right: 15px;">&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;<input name="base[is_locations]" value="3" {if condition="$card['is_locations'] eq '3'"} checked{/if}  type="radio" style="margin-left: 0;">&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;<label class="ng-binding">无指定门店</label>&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<div style="padding-left: 20px;overflow: hidden;"  id="wzdmd">&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<span class="radio pull-left" style="margin-right: 15px;">&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                    <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<input name="wzdtype" value="1" type="radio" style="margin-left: 0;">&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                    <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<label class="ng-binding">网上经营，无须到店消费</label>&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;</span>&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<span class="radio pull-left" style="margin-right: 15px;">&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                    <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<input name="wzdtype" value="2" type="radio"  style="margin-left: 0;">&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                    <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;<label class="ng-binding">其他原因</label>&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                                <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;</span>&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;&lt;!&ndash;</div>&ndash;&gt;&ndash;&gt;&ndash;&gt;-->
                                                        <!--&lt;!&ndash;&lt;!&ndash;</span>&ndash;&gt;&ndash;&gt;-->
                                                        <!--&lt;!&ndash;&lt;!&ndash;<div class="qtyy hide" style="margin-top: 8px;">&ndash;&gt;&ndash;&gt;-->
                                                            <!--&lt;!&ndash;&lt;!&ndash;<textarea name="qtyy"  id="qtyy" class="form-control" cols="30" rows="10" style="resize: none;" placeholder="请认真填写原因"></textarea>&ndash;&gt;&ndash;&gt;-->
                                                        <!--&lt;!&ndash;&lt;!&ndash;</div>&ndash;&gt;&ndash;&gt;-->
                                                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
                                                <!--</div>-->
                                            <!--</div>-->
                                        <!--</div>-->

                                        <div class="panel panel-default" id="memberDetail">
                                            <div class="panel-heading">会员卡详情</div>
                                            <div class="panel-body">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">权益说明：<span class="glyphicon glyphicon-asterisk glyphicon-tip"></span></label>
                                                    <div class="col-sm-10">
                                                        <textarea name="benfit[desc]" id="prerogative" rows="4" cols="" class="form-control" placeholder="例如：用卡可享受8.8折扣" style="resize: none;" >{$card['benefit_desc']}</textarea>
                                                    </div>
                                                </div>
                                                <!--<div class="form-group">-->
                                                    <!--<label class="col-sm-2 control-label">图文介绍(选填)：</label>-->
                                                    <!--<div class="col-sm-10">-->
                                                        <!--<div class="r-desc ng-scope">图片建议尺寸：900像素 * 500像素，大小不超过2M。<br>至少上传1组图文，最多输入5000字-->
                                                        <!--</div>-->
                                                        <!--<div class="member-card text-image-list ">-->
                                                            <!--<div class="text-image-list-add">-->
                                                                <!--<span class="icon_article_add">-->
                                                                    <!--<a class="icon42_common add_gray">添加图文</a>-->
                                                                <!--</span>-->
                                                            <!--</div>-->
                                                        <!--</div>-->
                                                    <!--</div>-->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <button type="submit" class="btn btn-success">保存</button>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>

        {include file='public/footer'/}
        <!--获取门店列表-->
        <!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document" style="width: 800px;">
                <div class="modal-content">
                    <div class="modal-header" style="background: #F4F5F9;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title" id="myModalLabel">选择门店</h4>
                    </div>
                    <div class="modal-body">
                        <div class="panel panel-default panel-modal" style="border: 0;">
                            <div class="panel-heading"
                                 style="overflow: hidden;background: #F4F5F9;border: 1px solid #ddd;border-bottom: 0;">
                                <div class="checkbox pull-left">
                                    <label>
                                        <!--<input type="checkbox" id="allchoice"> 门店名称-->
                                        门店名称
                                    </label>
                                </div>
                                <div class="checkbox pull-right" style="margin-top: 10px;">
                                    <label>地址</label>
                                </div>
                            </div>
                            <div class="panel-body" style="padding: 0;">

                                <table class="table table-bordered">
                                    <tbody id="tbody"></tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer"
                         style="text-align: center;overflow: hidden;background: #F4F5F9;border: 1px solid #ddd;border-top: 0;">
                        <button type="button" class="btn btn-success" id="choiceComplate">完成</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
</body>
<script src="__STATIC_URL__/static/js/bootstrapSwitch.js"></script>
<script>
    function addform() {
        $('#addcards').submit();
    };
    $(function () {
//        监听模态框显示调取门店数据
        $('#myModal').on('show.bs.modal', function () {
            $.ajax({
                url: "{:url('mach/getstorelist')}",
                type: "post",
                success: function (data) {
                    if(data.code==0){
                        var datas = data.list.data;
                        if (datas == "") {
                            $("#tbody").html("<tr><td>暂无门店</td></tr>");
                        } else {
                            var trlist = "";
                            for (var i = 0; i < datas.length; i++) {
                                trlist += "<tr>" +
                                    "<td><div class='checkbox pull-left'><label><input type='checkbox' name='mallcheck' data-id='" + datas[i].mapid + "'>" + datas[i].business_name + "</label></div></td>" +
                                    "<td><div class='checkbox pull-left'><label>" + datas[i].address + "</label></div></td>" +
                                    "</tr>"
                            }
                            $("#tbody").html(trlist);
                        }
                    }else if(data.code==9001){
                        $("#tbody").html("<tr><td>查询失败</td></tr>");
                    }else if(data.code==9002){
                        $("#tbody").html("<tr><td>暂无门店</td></tr>");
                    }

                }
            })
        });
//        选择适用门店模态框数据清空
        $('#myModal').on('hide.bs.modal', function () {
            $("#tbody").html("");
        });
//        选择适用门店完成
        $('#choiceComplate').click(function () {
            var len = $("input[name='mallcheck']").length;
            var checkid = "";
            for (var i = 0; i < len; i++) {
                if ($("input[name='mallcheck']").eq(i).is(':checked')) {
                    var id = $("input[name='mallcheck']").eq(i).attr("data-id");
                    if (checkid == "") {
                        checkid = id;
                    } else {
                        checkid += "," + id;
                    }
                }
            }
            if (checkid == "") {
                layer.alert("请选择门店")
            } else {
                $("#location_id_list").val(checkid);
                $('#myModal').modal("hide");
            }
        });
//        全选
        $("#allchoice").click(function(){
            var t = $(this).is(":checked");
            if(t == true){
                $("input[name='mallcheck']").attr("checked",true);
            }else if(t==false){
                $("input[name='mallcheck']").removeAttr("checked");
            }
        });
        $('#end_time').datetimepicker({
            minView: "month", //选择日期后，不会再跳转去选择时分秒
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            todayBtn: 1,
            autoclose: 1,
            todayHighlight: true,
        });
    });

</script>
<script type="text/javascript">
    function upload(file, typed) {
        var formData = new FormData();
        formData.append('file', $('#' + file)[0].files[0]);
        formData.append('other', file);
        $.ajax({
            url: "{:url('uploads/upload')}",
            type: 'POST',
            cache: false,
            data: formData,
            processData: false,
            contentType: false,
        }).done(function (res) {
            if(res.code=="0"){
//            左侧预览图背景
            $("." + file).css("backgroundImage", "url(" + res.pic + ")");
//            右侧预览图片
            $("." + file + "-img").attr("src", res.pic);
//            相应隐藏input传值
            $("#" + file + "-pic").val(res.loc_pic);
            $("#" + file + "-upload").val(res.pic);
            }else{
                layer.alert(res.message);
            }
            // $("." + file).attr("src", res.savapath).css("display", "block");
            // $(".file-" + file).val(res.other);
            // $("." + typed + "-" + file).val(res.other);
        }).fail(function (res) {
            alert("上传失败")
        });
    };
    $(function () {
//        选取优惠券背景颜色
        $(".color-list li").click(function () {
            $(".color-list li").removeClass("selected");
            $(this).addClass("selected");
            var colors = $(this).attr("data-color");
            $(".card_section").css("background-color", colors);
            $(".ljsy").css("background-color", colors);
            $("input[name='base[color]']").val(colors);
        });
    })
</script>


</html>
